v17/migrations - delegate tracking out of core.#921
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
….com/KevinJump/uSync into v17/migrations-full-set-cache-policy
…functionality out of core.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates editor-alias change tracking and legacy-to-new value mapping support out of uSync.Core (removing DB persistence/migration concerns from core) and enables external packages (e.g., uSync.Migrations) to provide tracking + mapper behavior via new extension points.
Changes:
- Removed core DB persistence/migration infrastructure (repositories/services/migration plans) previously used for alias-change tracking.
- Introduced tracking extension points:
IConfigurationTrackingSerializerandISyncMapperTracker(+SyncMapperTrackerCollection) for externalized alias rename tracking and mapper discovery. - Added a core notification (
SyncExportCleanNotification) and published it on export folder clean to allow external cleanup.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uSync.Core/uSyncCoreBuilderExtensions.cs | Removes core migration registration; registers new mapper-tracker collection. |
| uSync.Core/uSync.Core.csproj | Adds Notifications folder entry for the new notification type. |
| uSync.Core/Serialization/Serializers/DataTypeSerializer.cs | Replaces DB-backed rename tracking with ConfigurationSerializerCollection.TrackRenamedEditorAsync. |
| uSync.Core/Persistance/SyncDataServiceBase.cs | Deleted: core persistence service base. |
| uSync.Core/Persistance/SyncDataRespositoryBase.cs | Deleted: core persistence repository base. |
| uSync.Core/Persistance/SyncDataRepositoryCachePolicy.cs | Deleted: core persistence cache policy. |
| uSync.Core/Persistance/ISyncDataService.cs | Deleted: core persistence service interface. |
| uSync.Core/Persistance/ISyncDataRespository.cs | Deleted: core persistence repository interface. |
| uSync.Core/Persistance/ISyncDataRepositoryCachePolicy.cs | Deleted: core persistence cache policy interface. |
| uSync.Core/Persistance/ISyncDataEntity.cs | Deleted: core persistence entity interface. |
| uSync.Core/Notifications/SyncExportCleanNotification.cs | Adds new notification to support external cleanup when export is cleaned. |
| uSync.Core/Migrations/* | Deleted: core migration tracking types, repo/service, and migration plan/table creation. |
| uSync.Core/Mapping/Tracking/SyncMapperTrackerCollection.cs | Adds collection/builder to aggregate external tracker-provided mappers. |
| uSync.Core/Mapping/Tracking/ISyncMapperTracker.cs | Adds tracker interface for external alias-based mapper retrieval. |
| uSync.Core/Mapping/SyncValueMapperCollection.cs | Switches importing mappers discovery from DB to tracker collection; updates mapper selection to use IsMapper. |
| uSync.Core/Mapping/SyncValueMapperBase.cs | Adds IsMapper(string) default behavior for mapper base classes. |
| uSync.Core/Mapping/ISyncMapper.cs | Adds IsMapper(string) to the public mapper interface. |
| uSync.Core/DataTypes/IConfigurationSerializer.cs | Adds IConfigurationTrackingSerializer for rename tracking callbacks. |
| uSync.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs | Adds rename-tracking dispatch method on ConfigurationSerializerCollection. |
| uSync.BackOffice/Services/SyncService.cs | Publishes SyncExportCleanNotification when cleaning export folder; removes unused usings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
….com/KevinJump/uSync into v17/migrations-full-set-cache-policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the tracking of changed in DataType EditorAlias, and mapping of content values from older to to newer editor aliases, out of the core and to 'external' (e.g uSync.Migrations) code. .,
IConfigurationTrackingSerializerinterface so editorAlias renames can be passed onISyncMapperTrackerand collection so we can fetch additional value mappers from external sources when mapping the content values.Doing this means that the core no longer has the database tables, so there is no extra overheads for people who don't have uSync.Migrations installed.
uSync.Migrations will now handle the persistence for tracking changes that happen when datatypes are updated without core knowing about them.